package cn.bbs.ba.Timer;


import java.util.Calendar;
import java.util.TimerTask;

import javax.servlet.ServletContext;

public class Timer4Index extends TimerTask {
	private static final int C_SCHEDULE_HOUR = 0;
	private static boolean isRunning = false;
	private ServletContext context = null;

	public Timer4Index() {
	}

	public Timer4Index(ServletContext context) {
		this.context = context;
	}

	public void run() {
		Calendar cal = Calendar.getInstance();
		
			if (!isRunning) {
				//if (C_SCHEDULE_HOUR == cal.get(Calendar.HOUR_OF_DAY)) {
					isRunning = true;
					context.log("Timer4Index start");

					//
					try {
						
					}catch(Exception ex) {
						;
					}
					isRunning = false;
					context.log("Timer4Index end");
				//}
			} else {
				context.log("Timer4Index running");
			}

	}

}
